export class userrecharge {
  id?: number;
  name = '';
  uid = ''
  orderId = ''
  price = ''
  givePrice = ''
  rechargeType?: number
  paid = ''
  payTime = ''
  avatar?: string
  createTime = ''
  refundPrice = ''
  constructor(data?: userrecharge) {
    data && this.setProps(data);
  }

  setProps(data: userrecharge) {
    (Object.keys(this) as Array<keyof Iuserrecharge>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}

export type Iuserrecharge = Omit<userrecharge, 'setProps'>